<?php
class Gallery_Model_DbTable_Album extends Zend_Db_Table_Abstract {
	protected $_name = 'gallery_album';
	
	protected $_dependentTables = array(
        'Gallery_Model_DbTable_Image',
		'Gallery_Model_DbTable_Media',
		'Site_Model_DbTable_HasAlbum'
    );

    protected $_referenceMap    = array(
        'Gallery' => array(
            'columns'           => 'gallery_id',
            'refTableClass'     => 'Gallery_Model_DbTable_Gallery',
            'refColumns'        => 'id',
            'refColumnsAsName'  => 'name',
            'onDelete'		=> self::CASCADE
        )
    );
}